package com.example.yuwei.registerlogin_system.presenter;

import android.os.Handler;

import com.example.yuwei.registerlogin_system.bean.User;
import com.example.yuwei.registerlogin_system.module.RegisterModule.RegisterModule;
import com.example.yuwei.registerlogin_system.module.RegisterModule.RegisterModuleImpl;
import com.example.yuwei.registerlogin_system.view.RegisterView;

public class RegisterPresenter {
    private RegisterView registerView;
    private RegisterModule registerModule;
    private Handler mHandler;

    public RegisterPresenter(RegisterView registerView) {
        this.registerView = registerView;
        registerModule = new RegisterModuleImpl();
    }

    public void register() {
        User user = new User();
        registerView.setData(user);
        mHandler = registerView.showMessage();
        registerModule.register(user, mHandler);
    }
}
